package business;

import java.util.HashSet;
import java.util.Set;

/**
 * 
 * @author Joao Pires 2011
 *
 */

public class SingletonAluno {
	/**
	 * The SingletonAluno will allow for a single instance of the Aluno database
	 */
	private static Set<Aluno> alunos = new HashSet<Aluno>(10000);
	private static SingletonAluno instance = new SingletonAluno();

	/**
	 * empty constructor for the type
	 */
	public SingletonAluno(){
	}
	
	/**
	 * 
	 * @return the instance getter
	 */
	public static SingletonAluno getInstance() {
		return instance;
	}
	
	/**
	 * 
	 * @return all the students
	 */
	public static Set<Aluno> objectos()
	{
		return alunos;
	}
	/**
	 * resets the database
	 */
	public static void reset()
	{
		alunos.clear();
	}

	/**
	 * adds a given student to the database
	 * @param aluno	given student
	 */
	public void add(Aluno aluno) {
		alunos.add(aluno);
	}

	
}
